
<!-- HEADER START -->
<?php 

require_once("DB_Config.php");
require_once("func.php"); //Access To session_start

$db_connect = DB_Connection::getInstance();

?>

<script>

function fadein(){  
$('#overlay').fadeIn('slow');
$('#popupBox').fadeIn('slow');
$('#popupContent').fadeIn('slow');    
}

function fadeout(){
$('#overlay').fadeOut('slow');
$('#popupBox').fadeOut('slow');
$('#popupContent').fadeOut('slow');    
}

</script>

<div>



<?php
session_start_ifRequired();
if(isset($_SESSION['myusername'])==FALSE)
{

?>

<div id="logo"><a href="index.php">A&A ONLINE HOUSE SHOWER</a></div>

<div id="head_buttons">

<div id="content" class="col" >

<input type="button" value="Login" name="send" onclick="fadein()" class="head_button">
   
<?php }  else{    ?>

<div id="logo"><a href="<?php if($_SESSION['p'] == 'mng') echo "admin.php"; else echo "client.php";?>">A&A ONLINE HOUSE SHOWER</a></div>

<div id="head_buttons">

<div id="content" class="col" >

<input type="button" value="Logout" name="send" onclick="location.href='logout.php'" class="head_button">
        
<?php } ?>
    
</div>

<div class="col" >
 <input type="button" value="Search" name="send" onClick="location.href='search_shower.php'" class="head_button">
</div>

<div class="col" >
   <input type="button" value="Contact Us" name="send" onClick="location.href='contact.php'" class="head_button">
</div>

</div>
</div>

    <div id="overlay" style="display: none;"></div>

    <div id="popupBox" style="display: none;">  
    
        <div id="popupContent" style="display: none;"><i>Login Form ::</i><i>  Are You Already Registred ?</i><br>      
            <br>
       
            <form name="login_form" method="post" action="checklogin.php">
                <ul class="login_tab">
                    Username : <input type="text" class="inputheader" style="width:93px" maxlength="20" id="username" name="username">
                    Password : <input type="password" class="inputheader" style="width:97px" maxlength="20" id="password" name="password">
                    
                </ul>
                <button class="head_button"/>Login</button>
            </form>
       
            <?php
            $ex = Explode ('/',$_SERVER["PHP_SELF"]); 
            if($ex[2] != "registration.php")
            {?> <button class="head_button" onClick="location.href='registration.php'" />Registration</button>  <?php } ?>
       
           <button style="width:130px;" class="head_button" onClick="location.href='client.php'"/>Forgot Password</button>
           <button class="head_button" onclick="fadeout()">Close</button>

        </div>
    </div>

<!-- LOGIN Dropdown Start -->
<?php

if(isset($_SESSION['myusername'])==FALSE)
{

?>
   

   
<?php }  else{    ?>


        
<?php } 

// function session_start_ifRequired(){
// 	if(isset($_SESSION)){
// 		return;
// 	}else{session_start();}
// }
?>

<!-- LOGIN Dropdown End -->  

   
<!-- HEADER END -->
 

    
    


